feat(notes): blank note editor + edit flow#1427
Conversation
Wires the "New blank note" dropdown option to a full-page editor view that creates Project Status Updates via the BE `create_project_status_update` endpoint, and re-instates the per-card ellipsis dropdown with an "Edit" option that opens the same editor in update mode (`update_project_status_update`). The editor hides the "About this project" sidebar and the project tabs strip for a distraction-free authoring experience, leaving only the breadcrumb + sub-header (avatar + name + "Save note") and a TextEditor workspace with placeholder text. Also fixes a pre-existing tab-order mismatch in `tabs/index.tsx` where TAB_KEYS had "notes" at index 3 but TABS had Risks at index 3 — `?tab=notes` rendered Risks content and clicks on the Notes tab generated `?tab=risks` URLs. Reordering TABS to match TAB_KEYS unbreaks the redirect target this PR depends on and the view-selector dropdown on the Risks tab. Fixes #1097 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a dedicated full-page note editor under Project Details to support creating a new “blank note” and editing existing notes (Project Status Updates), including routing and a per-note card “Edit” action. Also fixes a tab ordering mismatch so ?tab=notes correctly renders the Notes tab content (needed for post-save redirect).
Changes:
- Introduces
/projects/:projectId/notes/newand/projects/:projectId/notes/:noteId/editroutes backed by a newnote-editor/page and supporting hooks. - Adds an ellipsis dropdown on note cards with an “Edit” action that navigates to the edit route.
- Reorders the Project Details
TABSarray to align withTAB_KEYSso Notes/Risks tabs map correctly.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/packages/app/src/route.tsx | Registers new note editor routes and lazy-loads the editor page. |
| frontend/packages/app/src/pages/project-details/tabs/notes/noteCard.tsx | Turns the note card ellipsis into an actions dropdown with “Edit”. |
| frontend/packages/app/src/pages/project-details/tabs/index.tsx | Fixes Notes/Risks tab content ordering to match query-string tab keys. |
| frontend/packages/app/src/pages/project-details/note-editor/index.tsx | New full-page editor shell with edit-mode gating + save/redirect behavior. |
| frontend/packages/app/src/pages/project-details/note-editor/workspace.tsx | New title textarea + TextEditor workspace UI for the note body. |
| frontend/packages/app/src/pages/project-details/note-editor/subHeader.tsx | New sub-header showing avatar/name and Save button. |
| frontend/packages/app/src/pages/project-details/note-editor/useNoteMutation.ts | New unified create/update “save” hook for notes. |
| frontend/packages/app/src/pages/project-details/note-editor/useNoteDetail.ts | New note detail fetch hook for edit mode. |
| frontend/packages/app/src/pages/project-details/note-editor/constants.ts | New path builders for editor routes + notes grid redirect URL. |
| frontend/packages/app/src/pages/project-details/note-editor/types.ts | New shared types for editor mode and draft shape. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- workspace.tsx: pass fixedMenu={false} explicitly to TextEditor so the
distraction-free editor never grows a toolbar regardless of upstream
default changes.
- useNoteMutation.ts: drop unused NoteEditorMode import flagged by lint.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
The sidebar is not visible for this page. Update about/index to look at current location for rendering
There was a problem hiding this comment.
Addressed in e88cf7e — editor%2Findex.tsx (sidebar self-hides via useMatch in about/index.tsx).
Per maintainer review on PR #1427: replace the search-param view-switch in tabs/notes with real `/projects/:projectId/notes/{new,:noteId/edit}` routes nested under the project detail. - route.tsx: nest two child routes under :projectId, lazy-load NoteEditor - project-details/index.tsx: lift NotesProvider; detect editor routes via useMatch and swap the Tabs strip for <Outlet /> - about/index.tsx: split out content; return null on editor routes so the sidebar self-hides - tabs/notes/index.tsx: drop the activeView switch; Notes just renders the grid (NotesProvider lives one level up) - tabs/notes/noteCard.tsx: Dropdown Edit option navigates to the edit URL - tabs/notes/subHeader.tsx: New blank note navigates to .../notes/new - tabs/notes/editor/index.tsx: read noteId/projectId from useParams, infer mode from noteId, useNavigate to return to ?tab=notes after save - tabs/notes/constants.ts: drop NOTE_ID/NOTE_MODE search-param keys Browser-verified on PROJ-0205: - /?tab=notes renders tabs + grid + sidebar - /notes/new renders the editor full-width, no tabs/sidebar - /notes/<id>/edit pre-populates title + body, no tabs/sidebar Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5611569 to
f05053e
Compare
Description
/projects/:projectId/notes/new) that creates a Note./projects/:projectId/notes/:noteId/edit) that loads the same editor in update mode. Save returns the user to the Notes grid (?tab=notes), where SWR revalidates on mount and shows the new / updated card.1 week ago.Screenshot/Screencast
Screen.Recording.2026-06-05.at.3.34.34.PM.mov
Checklist
Fixes #1097